package service

import "xueyuan_backend/model"

func SearchWebsite(keyword string) (websites []model.Website){
	websites = SearchWebsiteFromDB(keyword)
	return websites
}

func AddSubscribe(user_id  string,website_url string) bool{
	if AddSubscribeToDB(user_id,website_url) == false{
		return false
	}

	return true
}

func DeleteSubscribe(user_id  string,website_url string) bool{
	if DeleteSubscribeToDB(user_id,website_url) == false{
		return false
	}
	return true
}

func SubscribeView(user_id string) (websites []model.Website){
	websites = SubscribeViewFromDB(user_id)
	return websites
}